WPS Office.apk(点击下载) / bcp.java


package defpackage;

import cn.wps.base.log.Log;
import java.io.InputStream;
import org.xml.sax.EntityResolver;
import org.xml.sax.InputSource;

/* renamed from: bcp  reason: default package */
public final class bcp implements EntityResolver {
    private static final String TAG = null;

    @Override // org.xml.sax.EntityResolver
    public final InputSource resolveEntity(String str, String str2) {
        String str3;
        new StringBuilder("Start resolving entity, public id: ").append(str).append(", system id: ").append(str2);
        Log.gq();
        if (str2.equals("http://xml.evernote.com/pub/enml2.dtd")) {
            str3 = "enml2.dtd";
        } else if (str.equals("-//W3C//ENTITIES Latin 1 for XHTML//EN") || str2.equals("http://www.w3.org/TR/xhtml1/DTD/xhtml-lat1.ent")) {
            str3 = "xhtml-lat1.ent";
        } else if (str.equals("-//W3C//ENTITIES Symbols for XHTML//EN") || str2.equals("http://www.w3.org/TR/xhtml1/DTD/xhtml-symbol.ent")) {
            str3 = "xhtml-symbol.ent";
        } else if (str.equals("-//W3C//ENTITIES Special for XHTML//EN") || str2.equals("http://www.w3.org/TR/xhtml1/DTD/xhtml-special.ent")) {
            str3 = "xhtml-special.ent";
        } else {
            new StringBuilder("Unexpected entity, public id: ").append(str).append(", system id: ").append(str2);
            ex.eI();
            return null;
        }
        InputStream resourceAsStream = getClass().getResourceAsStream(str3);
        ex.assertNotNull("Failed to get InputStream for file: " + str3, resourceAsStream);
        return new InputSource(resourceAsStream);
    }
}